package test.observer;

import java.util.Observable;

/**
 * Created by Administrator on 2016/7/31.
 * 目标对象
 */
public class Subject extends Observable {
    private String message;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 通知观察者
     */
    public void notice() {
        this.setChanged();
        this.notifyObservers();
    }
}
